Fix BigQuery case-insensitive-cache#23481
Merged
ebyhr merged 2 commits intotrinodb:masterfrom Sep 20, 2024
Merged
Conversation
cacc1ed to
0c40ca2
Compare
Member
|
/test-with-secrets sha=0c40ca249b2b6874f0f0feaa9c7774a8ad6b03c4 |
|
The CI workflow run with tests that require additional secrets finished as failure: https://github.com/trinodb/trino/actions/runs/10920739075 |
0c40ca2 to
ae6499b
Compare
anusudarsan
approved these changes
Sep 18, 2024
ae6499b to
847cecb
Compare
ebyhr
reviewed
Sep 20, 2024
ebyhr
approved these changes
Sep 20, 2024
847cecb to
ff782a7
Compare
Member
|
/test-with-secrets sha=ff782a76f6a13e7516f68ed0ec044207d73b53c6 |
|
The CI workflow run with tests that require additional secrets finished as failure: https://github.com/trinodb/trino/actions/runs/10957801373 |
Member
Author
Failed on not related |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Right now
case-insensitive-cachemay contain only one value (in most cases) withprojectIdas key and names mapping as value. This causes cache to be build once and is never updated until it's invalidated. Also it's build with values available from one query only. It's not big problem for schema as for all queries we always supply cache fromclient.listDatasetIds(projectId).For table it's buggy as some queries have limited information.
For example:
This PR changes cache structure to be based on table/schema name as key. Also cache is updated on every query if key is not found.
Additional context and related issues
Change in test to remove
.put("bigquery.service-cache-ttl", "0ms")is needed to get cache working. With this property set to 0.BigQueryClientis initialised for each query, which results in building cache from scratch for each query.Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text: